<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Warehousing extends Model
{
    public function school()
    {
        return $this->hasOne(School::class,'id','school_id')->bind(['name']);
    }

    public function supplier()
    {
        return $this->hasOne(Supplier::class,'id','supplier_id')->field('id,name,mobile,contact');
    }

    public function detail()
    {
        return $this->hasMany(WarehousingDetails::class,'warehousing_id','id');
    }
}
